﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using T.Settlement.Domain;
using T.Settlement.Domain.DTO;
using T.Settlement.Repository.SettlementInterface;

namespace T.Settlement.Repository.SettlementImpl
{
    /// <summary>
    /// 进/销项管理仓储实现
    /// </summary>
    public class InvoiceSRepository : SBaseRepository<Invoice>, IInvoiceSRepository
    {
        public InvoiceSRepository(SEFDbcontext sEFdbcontext) : base(sEFdbcontext)
        {
        }
        /// <summary>
        /// 添加进/销项管理
        /// </summary>
        /// <param name="invoice"></param>
        /// <returns></returns>
        public async Task<int> AddInvoice(Invoice invoice)
        {
            return await base.AddAsync(invoice);
        }
        /// <summary>
        /// 删除进/销项管理
        /// </summary>
        /// <param name="invoice"></param>
        /// <returns></returns>
        public async Task<int> DelInvoice(Invoice invoice)
        {
            return await base.Update(invoice);
        }
        /// <summary>
        /// 修改进/销项管理
        /// </summary>
        /// <param name="invoice"></param>
        /// <returns></returns>
        public async Task<int> UpdInvoice(Invoice invoice)
        {
            return await base.Update(invoice);
        }
        /// <summary>
        /// 显示进/销项管理
        /// </summary>
        /// <returns></returns>
        public async Task<List<Invoice>> GetInvoice()
        {
            return await base.GetAllAsync();
        }
    }
}
